package com.sun;

import com.sun.dao.impl.UserDao1Impl;
import com.sun.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        // 创建IOC容器
        ApplicationContext act = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = act.getBean(UserService.class);
        userService.getUsers();
        userService.upUsers();
    }
}
